<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>#{{ title1 }}  {{ title2 }}</title>
</head>
<body>
<h1>#{{ title1 }} {{ title2 }}</h1>
    {% if request.user.is_staff or instance.patient.id == request.user.id %}

        <b>{{ instance.patient.username }}</b>  <br/>
        {{ instance.patient.email }}<br/>
        <b>flare at:</b> {{ instance.flare_up_time }}<br/>
        <b>symptom1: </b> {{ instance.symptoms }}  <b>{{ instance.symptoms_level }}</b><br/>
        <b>happened when: </b>{{ instance.activity_performed_during_onset_of_symptoms }}<br/>

        {% if obj.symptoms2 %}
            <br>
        <b>symptom2: </b> {{ obj.symptoms2 }}  <b>{{ obj.symptoms_level2 }}</b><br/>
        <b>happened when: </b>{{ obj.activity_performed_during_onset_of_symptoms2 }}<br/>
        {% endif %}

        {% if obj.symptoms3 %}
            <br>
        <b>symptom3: </b> {{ obj.symptoms3 }}  <b>{{ obj.symptoms_level3 }}</b><br/>
        <b>happened when: </b>{{ obj.activity_performed_during_onset_of_symptoms3 }}<br/>
        {% endif %}

        <b>other description: </b>{{ instance.optional_description }} </br>
    {% endif %}
    {% if instance.patient.id == request.user.id %}
        <a href='{{ instance.get_absolute_url1 }}'>Edit</a>&nbsp&nbsp
        <a href='{{ instance.get_absolute_url2 }}'>Delete</a><br/>
        {% if not request.user.is_staff %}
        <a href="{% url "posts:mine" %}"> <<< Mine</a>
    {% endif %}{% endif %}

{% if request.user.is_staff %}
         <a href="{% url "posts:list" %}"> <<< List</a>
{% endif %}

</body>
</html>